home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_nub_bowdoor.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  96 lines

  1. # Jones 3D Cog Script
  2. #
  3. # nub_BowDoor.cog
  4. #
  5. # [TL] [GGJ]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. #
  9. # ========================================================================================
  10. symbols
  11.  
  12. message    activated
  13. message    arrived
  14.  
  15. thing    door
  16. thing    button
  17. thing    player            local
  18. thing    exitActor
  19. thing    exitCam
  20. thing    exitGhost
  21.  
  22. keyframe    activate=in_activate_medium.key          local
  23.  
  24. sound    creak 
  25. sound    slam
  26.  
  27. int        done=0            local
  28.  
  29. end
  30.  
  31. # ========================================================================================
  32. code
  33.  
  34. activated:
  35.  
  36. player = GetLocalPlayerThing();
  37. if (GetCurWeapon(player) != 0) return;
  38. if (done == 1) return;
  39. done=1;
  40.  
  41. StartCutscene(1);
  42. if ( MakeMeStop() == -1 ) return;
  43. DeselectWeaponWait(player);
  44.  
  45. CopyPlayerHolsters(player, exitactor);
  46.  
  47. SetCameraPosInterp(2, 0);
  48. SetCameraLookInterp(2, 0);
  49. SetCameraFocus(2, ExitCam);
  50. SetCameraSecondaryFocus(2, exitghost);
  51. SetCurrentCamera(2);
  52. SetCameraFOV(90, 0, 0.0);
  53.  
  54. SetThingFlags(player, 0x80000);
  55. ClearThingFlags(exitActor, 0x80000);
  56.  
  57. PlayKey(exitActor, activate, 4, 0x12, 0);
  58. Sleep(0.75);
  59.  
  60. MoveToFrame(button, 1, 1.0); 
  61.  
  62. PlaySoundThing(creak, door, 1.0, -1.0, -1.0, 0x80);
  63. Sleep(0.5);
  64.  
  65. Rotate(door, -90, 2, 0.5);
  66. PlaySoundThing(slam, door, 1.0, -1.0, -1.0, 0x80);
  67. SetThingMaxRotVel(exitActor, 190.0);
  68. AISetLookThingEyeLevel(exitActor, exitGhost);
  69. Sleep(2.0);
  70.  
  71. CopyOrientAndPos(exitActor, player);
  72. SetThingFlags(exitActor, 0x80000);
  73. ClearThingFlags(player, 0x80000);
  74.  
  75. SetCameraPosition(1, GetThingPos(exitCam));
  76. SetCurrentCamera(1);
  77.  
  78. ClearActorFlags(player, 0x200000);
  79. EndCutscene();
  80.  
  81. return;
  82.  
  83. # ........................................................................................
  84. arrived:
  85.  
  86. #if ((GetSenderRef() == button) && (GetCurFrame(button) == 1))
  87. #{
  88. #    MoveToFrame(button, 0, 1.0);
  89. #}
  90.  
  91. return;
  92.  
  93. # ........................................................................................
  94. end
  95.  
  96.